using System;
using System.IO;
using GHIElectronics.NETMF.IO;

namespace InternetThermostat.DeviceAccessor
{

    public class FileAccessor
    {
        public static PersistentStorage Storage = null;
        public static String Root = string.Empty;

        public static FileStream Open(string filename, FileMode fileMode)
        {
            var finalPath = Path.Combine(Root, filename);                    

            return File.Open(finalPath, fileMode);
        }

        public static bool Exists(string filename)
        {
            return File.Exists(Path.Combine(Root, filename));
        }


    }
}
